package num;

import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.net.URLDecoder;

/**
 * @author LIBOFEI
 * @ClassName Test
 * @description
 * @date 2021/2/20 15:55
 * @Version 1.0
 **/
public class Test {


    public static void main(String[] args) throws UnsupportedEncodingException {
//        System.out.println((float) 18 / 32);/**/
       /* System.out.println(new BigDecimal((float) 18 / 32).setScale(2, BigDecimal.ROUND_HALF_UP));
        System.out.println(new BigDecimal((float) 18 / 32).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
        double process = new BigDecimal((float) 27 / 46).setScale(4, BigDecimal.ROUND_HALF_UP).doubleValue();

        System.out.println(new BigDecimal(new BigDecimal(27).divide(new BigDecimal(46),4, BigDecimal.ROUND_HALF_UP).doubleValue()).multiply(new BigDecimal(100)).setScale(2,BigDecimal.ROUND_DOWN).doubleValue());
        System.out.println(process * 100);
        System.out.println(process * 100);*/



        String passback_params = new String("3000001708725837%231354378749868507136%23couponCode%230%23".getBytes("ISO-8859-1"),"UTF-8");
        passback_params = URLDecoder.decode(passback_params,"utf-8");// 注意一定要返回给支付宝一个成功的信息(不包含HTML脚本语言)

        System.out.println(passback_params);
    }
}
